using System;
using System.Collections;

using Pdb.Model;
using System.Xml.Serialization;

namespace Pdb.Model
{
	[Serializable]
	public class EntryCollection : CollectionBase
	{

		public int Add(Entry value)
		{
			return base.List.Add(value as object);
		}

		public void Remove(Entry value)
		{
			base.List.Remove( (object)value);
		}

		public void Insert(int index, Entry value)
		{
			base.List.Insert(index, (object)value);
		}

		public bool Contains(Entry value)
		{
			return base.List.Contains( (object)value);
		}

		public Entry this[int index]
		{
			get { return ( (Entry)base.List[index]); }
		}

		public int GetIndexOf(int iloffset)
		{
			for(int i = 0; i < base.List.Count; i++)
			{
				Entry e = (Entry)base.List[i];
				if(e.Offset == iloffset)
					return i;
			}
			return -1;
		}
	}
}
